<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ajax()方法</title>
</head>
<body>
    <button>按钮</button>
    <script src="./js/jquery-1.12.4.js"></script>
    <script>
      $(function(){       
          $.ajax('data/server1.json',{
        //   type:'get', //请求方式
        //   dataType:'text',//设置响应格式
          success:function(data){
              console.log(data)//接收响应数据，并打印
        }
    })
      })
    </script>
</body>
</html>